<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 引入ElementUI样式 -->
    <link rel="stylesheet" href="../js/index.css">
    <!-- 引入ElementUI组件库 -->
    <script src="../js/vue.js"></script>
    <script src="../js/index.js"></script>

</head>
<body>
    <div id="app">
        <el-container>
            <el-header>header</el-header>
            <el-container>
                <el-aside :width="width">
                    aside
                </el-aside>
                <el-container>
                    <el-main>
                        <button @click="doClick">点我</button>
                    </el-main>
                    <el-footer>footer</el-footer>
                </el-container>
            </el-container>
        </el-container>





<!--       <el-container>-->
<!--           <el-header>header</el-header>-->
<!--           <el-container>-->
<!--               <el-aside :width="width">-->
<!--                   aside-->
<!--               </el-aside>-->
<!--               <el-container>-->
<!--                   <el-main>-->
<!--                       <button @click="change">点我</button>-->
<!--                   </el-main>-->
<!--                   <el-footer>-->
<!--                       footer-->
<!--                   </el-footer>-->
<!--               </el-container>-->
<!--           </el-container>-->
<!--       </el-container>-->
    </div>
    <style>
        .el-header, .el-footer {
            background-color: #B3C0D1;
            color: #333;
            text-align: left;
            line-height: 60px;
        }

        .el-aside {
            background-color: #D3DCE6;
            color: #333;
            text-align: center;
            line-height: 200px;
        }

        .el-main {
            background-color: #E9EEF3;
            color: #333;
            text-align: center;
            line-height: 590px;
        }
    </style>
    <script>
       new Vue({
            el:'#app',
			data:{
				aside:"100px",
                height:"100px",
                width : "100px"
			},
            methods:{
                change(){
                    this.aside = "50px"
                },
                doClick(){
                    this.width = this.width == '100px' ? '50px' : '100px'
                }
            }
        });
    </script>
</body>
</html>